public enum ResponseTag {
    SUCCESS(0x01, "Success"),
    FAILURE(0x02, "Failure"),
    COMMAND_NOT_SUPPORTED(0x03, "VIN重复"),
    PARAMETER_ERROR(0xFE, "Parameter error");

    private final byte value;
    private final String description;

    ResponseTag(int value, String description) {
        this.value = (byte) value;
        this.description = description;
    }

    public byte getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static ResponseTag fromByte(byte value) {
        for (ResponseTag tag : ResponseTag.values()) {
            if (tag.value == value) {
                return tag;
            }
        }
        throw new IllegalArgumentException("Unknown ResponseTag value: " + value);
    }
}
